<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>yLib: /home/sky/yLib/include/utility/yhttp.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">yLib
   &#160;<span id="projectnumber">V0.0.9 beta</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('yhttp_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">yhttp.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="yhttp_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * @Description: </span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * @Author: Sky</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * @Date: 2020-03-18 15:42:22</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * @LastEditors: Sky</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * @LastEditTime: 2020-07-14 18:27:49</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * @FilePath: \yLib\include\core\yhttp.hpp</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * @Github: https://github.com/flyinskyin2013/yLib</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef __YLIB_UTILITY_YHTTP_HPP__</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define __YLIB_UTILITY_YHTTP_HPP__</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="yobject_8hpp.html">core/yobject.hpp</a>&quot;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceyLib.html">yLib</a>{</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html">   23</a></span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_yhttp_request_param_{</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <span class="comment">//only support http</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#aeb25add88aa3e647ee7c1bd1e32784ee">   27</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> protocol_type=<span class="stringliteral">&quot;http&quot;</span>;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#ae3d53ac366eb1d981dcd9d4483d3a2f7">   29</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> username=<span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#a1e8e1b586a6aa0493b3e45cc2aa21d18">   30</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> password=<span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#aa2212f55e6d17112f49f26a1a5de41cd">   32</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> host=<span class="stringliteral">&quot;127.0.0.1&quot;</span>;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#a6c56f8ebb8ebddd985704dc985e23634">   34</a></span>&#160;        int32_t port=80;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#a0ff8f1db47f227eb14a83d80adcdab60">   36</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> path=<span class="stringliteral">&quot;/&quot;</span>;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html">   37</a></span>&#160;        <span class="keyword">struct </span><a class="code" href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html">__yhttp_request_query_kv__</a>{</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html#a2abef544d344d7de58ae8432fce98f21">   38</a></span>&#160;            <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html#a2abef544d344d7de58ae8432fce98f21">key</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html#a011af3a2b606b8846d923ab420e06d81">   39</a></span>&#160;            <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html#a011af3a2b606b8846d923ab420e06d81">value</a>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        };</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#ac28c3f230f8a796b6b077423d6dac16c">   41</a></span>&#160;        std::vector&lt;__yhttp_request_query_kv__&gt; <a class="code" href="structyHttpRequestParam.html#ac28c3f230f8a796b6b077423d6dac16c">query_kv_vec</a>;</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#ad7af29f39684f55176406f6863274c99">   42</a></span>&#160;        std::vector&lt;std::string&gt; <a class="code" href="structyHttpRequestParam.html#ad7af29f39684f55176406f6863274c99">http_header_vec</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structyHttpRequestParam.html#a774b99d8949fccc0c461b47e01d99454">   44</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> fregment=<span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    }<a class="code" href="structyHttpRequestParam.html">yHttpRequestParam</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structyHttpResponseInfo.html">   48</a></span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_yhttp_response_info_{</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structyHttpResponseInfo.html#a5218a6db28b67523a84a8e0aa5daeb36">   50</a></span>&#160;        <span class="keywordtype">long</span> <a class="code" href="structyHttpResponseInfo.html#a5218a6db28b67523a84a8e0aa5daeb36">response_code</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structyHttpResponseInfo.html#a066558b7987d03ba06b1990fc30c9bd0">   51</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpResponseInfo.html#a066558b7987d03ba06b1990fc30c9bd0">content_type</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structyHttpResponseInfo.html#a622808883a9032205c07a6556ba6deec">   52</a></span>&#160;        std::vector&lt;uint8_t&gt; <a class="code" href="structyHttpResponseInfo.html#a622808883a9032205c07a6556ba6deec">response_data_buf</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    }<a class="code" href="structyHttpResponseInfo.html">yHttpResponseInfo</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html">   55</a></span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_yhttp_post_multi_part_item_{</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#af3fdf5c3d2281a023f5bb1e1957d184a">   57</a></span>&#160;        <span class="keyword">static</span> <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostMultiPartItem.html#af3fdf5c3d2281a023f5bb1e1957d184a">GetJpgFileMIMEType</a>(<span class="keywordtype">void</span>){<span class="keywordflow">return</span> <span class="stringliteral">&quot;image/jpeg&quot;</span>;}</div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#afca9091d97ef6eb790dfbd6ce8200292">   58</a></span>&#160;        <span class="keyword">static</span> <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostMultiPartItem.html#afca9091d97ef6eb790dfbd6ce8200292">GetPngFileMIMEType</a>(<span class="keywordtype">void</span>){<span class="keywordflow">return</span> <span class="stringliteral">&quot;image/png&quot;</span>;}</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#ab08c2385db492c3958b9289a4bdda918">   59</a></span>&#160;        <span class="keyword">static</span> <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostMultiPartItem.html#ab08c2385db492c3958b9289a4bdda918">GetTextFileMIMEType</a>(<span class="keywordtype">void</span>){<span class="keywordflow">return</span> <span class="stringliteral">&quot;text/plain&quot;</span>;}</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#a21135254f5d98061464e3cda5ab0430b">   60</a></span>&#160;        <span class="keyword">static</span> <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostMultiPartItem.html#a21135254f5d98061464e3cda5ab0430b">GetBinFileMIMEType</a>(<span class="keywordtype">void</span>){<span class="keywordflow">return</span> <span class="stringliteral">&quot;application/octet-stream&quot;</span>;}</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#a64bc038f90da372129e119c3d3ee7707">   63</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostMultiPartItem.html#a64bc038f90da372129e119c3d3ee7707">content_disposition</a>;</div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#a5ff93a9893dde7c81570c6acb358a007">   64</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> content_type = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#af396516c031ddfc8f436ecde26b770f5">   66</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostMultiPartItem.html#af396516c031ddfc8f436ecde26b770f5">name</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#ae9e10bebbac66f6241a5d5443d3a63ed">   67</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostMultiPartItem.html#ae9e10bebbac66f6241a5d5443d3a63ed">filename</a>;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="structyHttpPostMultiPartItem.html#a98dea8d7299f151d463fd7dd6166f449">   69</a></span>&#160;        std::vector&lt;uint8_t&gt; <a class="code" href="structyHttpPostMultiPartItem.html#a98dea8d7299f151d463fd7dd6166f449">data_buf</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    }<a class="code" href="structyHttpPostMultiPartItem.html">yHttpPostMultiPartItem</a>;  </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="structyHttpPostUrlencodedItem.html">   72</a></span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_yhttp_post_urlencoded_item_{</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="structyHttpPostUrlencodedItem.html#a4341c09544ae3f6db4b667545b1b6adb">   74</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostUrlencodedItem.html#a4341c09544ae3f6db4b667545b1b6adb">key</a>;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="structyHttpPostUrlencodedItem.html#a6284f96f271324fc2bcfa340bfca0713">   75</a></span>&#160;        <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> <a class="code" href="structyHttpPostUrlencodedItem.html#a6284f96f271324fc2bcfa340bfca0713">value</a>;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    }<a class="code" href="structyHttpPostUrlencodedItem.html">yHttpPostUrlencodedItem</a>;  </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classyLib_1_1yHttp.html">   79</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classyLib_1_1yHttp.html">yHttp</a> <a class="code" href="yobject_8hpp.html#a456ca9afeca82fe693720d57ef746192">MACRO_PUBLIC_INHERIT_YOBJECT</a> {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <a class="code" href="classyLib_1_1yHttp.html#a30f8cce5bf74b4a44c5ee41de7c833cb">yHttp</a>() noexcept;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="classyLib_1_1yHttp.html#a6f210a2e10f8fa53da542b22de4f3b7f">~yHttp</a>() noexcept;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        int8_t <a class="code" href="classyLib_1_1yHttp.html#a2c2ca50c6ac8d6893478857d03587556">yHttpGet</a>(<span class="keyword">const</span> <a class="code" href="structyHttpRequestParam.html">yHttpRequestParam</a> &amp;request_param_, <a class="code" href="structyHttpResponseInfo.html">yHttpResponseInfo</a> &amp; response_info_);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="comment">//post application/x-www-form-urlencoded</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        int8_t <a class="code" href="classyLib_1_1yHttp.html#ac559483a9647e580dce71fed66dabbaa">yHttpPostDefault</a>(<span class="keyword">const</span> <a class="code" href="structyHttpRequestParam.html">yHttpRequestParam</a> &amp;request_param_, <a class="code" href="structyHttpResponseInfo.html">yHttpResponseInfo</a> &amp; response_info_, std::vector&lt;yHttpPostUrlencodedItem&gt; &amp; form_kv_vec_);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="comment">//post application/json</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        int8_t <a class="code" href="classyLib_1_1yHttp.html#a6ce13e2972d68be00235c7a613abfa48">yHttpPostJson</a>(<span class="keyword">const</span> <a class="code" href="structyHttpRequestParam.html">yHttpRequestParam</a> &amp;request_param_, <a class="code" href="structyHttpResponseInfo.html">yHttpResponseInfo</a> &amp; response_info_, <a class="code" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp; json_str_);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="comment">//post multipart/form-data</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        int8_t <a class="code" href="classyLib_1_1yHttp.html#a3f491c10d7cd73dcde63b64f33878209">yHttpPostMultiPart</a>(<span class="keyword">const</span> <a class="code" href="structyHttpRequestParam.html">yHttpRequestParam</a> &amp;request_param_, <a class="code" href="structyHttpResponseInfo.html">yHttpResponseInfo</a> &amp; response_info_, std::vector&lt;yHttpPostMultiPartItem&gt; &amp; form_multi_part_vec_);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classyLib_1_1yHttp.html#aca4d596a090aea322d77c4d16b650808">   98</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classyLib_1_1yHttp.html#aca4d596a090aea322d77c4d16b650808">yhttp_is_init_ok</a> = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    };</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="preprocessor">#endif //__YLIB_UTILITY_YHTTP_HPP__</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassyLib_1_1yHttp_html"><div class="ttname"><a href="classyLib_1_1yHttp.html">yLib::yHttp</a></div><div class="ttdef"><b>Definition:</b> yhttp.hpp:79</div></div>
<div class="ttc" id="asrc_2CMakeLists_8txt_html_a296644e9ff1d0a602b4703f361406374"><div class="ttname"><a href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">string</a></div><div class="ttdeci">module_name string(TOLOWER ${class_name} class_dir_name) set(SRC $</div><div class="ttdef"><b>Definition:</b> CMakeLists.txt:65</div></div>
<div class="ttc" id="aclassyLib_1_1yHttp_html_aca4d596a090aea322d77c4d16b650808"><div class="ttname"><a href="classyLib_1_1yHttp.html#aca4d596a090aea322d77c4d16b650808">yLib::yHttp::yhttp_is_init_ok</a></div><div class="ttdeci">bool yhttp_is_init_ok</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:98</div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html_a21135254f5d98061464e3cda5ab0430b"><div class="ttname"><a href="structyHttpPostMultiPartItem.html#a21135254f5d98061464e3cda5ab0430b">yHttpPostMultiPartItem::GetBinFileMIMEType</a></div><div class="ttdeci">static std::string GetBinFileMIMEType(void)</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:60</div></div>
<div class="ttc" id="astructyHttpRequestParam_1_1____yhttp__request__query__kv_____html_a2abef544d344d7de58ae8432fce98f21"><div class="ttname"><a href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html#a2abef544d344d7de58ae8432fce98f21">yHttpRequestParam::__yhttp_request_query_kv__::key</a></div><div class="ttdeci">std::string key</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:38</div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html_a98dea8d7299f151d463fd7dd6166f449"><div class="ttname"><a href="structyHttpPostMultiPartItem.html#a98dea8d7299f151d463fd7dd6166f449">yHttpPostMultiPartItem::data_buf</a></div><div class="ttdeci">std::vector&lt; uint8_t &gt; data_buf</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:69</div></div>
<div class="ttc" id="astructyHttpRequestParam_html"><div class="ttname"><a href="structyHttpRequestParam.html">yHttpRequestParam</a></div><div class="ttdef"><b>Definition:</b> yhttp.hpp:23</div></div>
<div class="ttc" id="astructyHttpResponseInfo_html_a5218a6db28b67523a84a8e0aa5daeb36"><div class="ttname"><a href="structyHttpResponseInfo.html#a5218a6db28b67523a84a8e0aa5daeb36">yHttpResponseInfo::response_code</a></div><div class="ttdeci">long response_code</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:50</div></div>
<div class="ttc" id="astructyHttpRequestParam_html_ac28c3f230f8a796b6b077423d6dac16c"><div class="ttname"><a href="structyHttpRequestParam.html#ac28c3f230f8a796b6b077423d6dac16c">yHttpRequestParam::query_kv_vec</a></div><div class="ttdeci">std::vector&lt; __yhttp_request_query_kv__ &gt; query_kv_vec</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:41</div></div>
<div class="ttc" id="astructyHttpResponseInfo_html_a622808883a9032205c07a6556ba6deec"><div class="ttname"><a href="structyHttpResponseInfo.html#a622808883a9032205c07a6556ba6deec">yHttpResponseInfo::response_data_buf</a></div><div class="ttdeci">std::vector&lt; uint8_t &gt; response_data_buf</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:52</div></div>
<div class="ttc" id="astructyHttpResponseInfo_html_a066558b7987d03ba06b1990fc30c9bd0"><div class="ttname"><a href="structyHttpResponseInfo.html#a066558b7987d03ba06b1990fc30c9bd0">yHttpResponseInfo::content_type</a></div><div class="ttdeci">std::string content_type</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:51</div></div>
<div class="ttc" id="astructyHttpPostUrlencodedItem_html"><div class="ttname"><a href="structyHttpPostUrlencodedItem.html">yHttpPostUrlencodedItem</a></div><div class="ttdef"><b>Definition:</b> yhttp.hpp:72</div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html"><div class="ttname"><a href="structyHttpPostMultiPartItem.html">yHttpPostMultiPartItem</a></div><div class="ttdef"><b>Definition:</b> yhttp.hpp:55</div></div>
<div class="ttc" id="ayobject_8hpp_html_a456ca9afeca82fe693720d57ef746192"><div class="ttname"><a href="yobject_8hpp.html#a456ca9afeca82fe693720d57ef746192">MACRO_PUBLIC_INHERIT_YOBJECT</a></div><div class="ttdeci">#define MACRO_PUBLIC_INHERIT_YOBJECT</div><div class="ttdoc">The public inherit from yObject.</div><div class="ttdef"><b>Definition:</b> yobject.hpp:101</div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html_ab08c2385db492c3958b9289a4bdda918"><div class="ttname"><a href="structyHttpPostMultiPartItem.html#ab08c2385db492c3958b9289a4bdda918">yHttpPostMultiPartItem::GetTextFileMIMEType</a></div><div class="ttdeci">static std::string GetTextFileMIMEType(void)</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:59</div></div>
<div class="ttc" id="astructyHttpResponseInfo_html"><div class="ttname"><a href="structyHttpResponseInfo.html">yHttpResponseInfo</a></div><div class="ttdef"><b>Definition:</b> yhttp.hpp:48</div></div>
<div class="ttc" id="astructyHttpRequestParam_1_1____yhttp__request__query__kv_____html_a011af3a2b606b8846d923ab420e06d81"><div class="ttname"><a href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html#a011af3a2b606b8846d923ab420e06d81">yHttpRequestParam::__yhttp_request_query_kv__::value</a></div><div class="ttdeci">std::string value</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:39</div></div>
<div class="ttc" id="aclassyLib_1_1yHttp_html_ac559483a9647e580dce71fed66dabbaa"><div class="ttname"><a href="classyLib_1_1yHttp.html#ac559483a9647e580dce71fed66dabbaa">yLib::yHttp::yHttpPostDefault</a></div><div class="ttdeci">int8_t yHttpPostDefault(const yHttpRequestParam &amp;request_param_, yHttpResponseInfo &amp;response_info_, std::vector&lt; yHttpPostUrlencodedItem &gt; &amp;form_kv_vec_)</div><div class="ttdef"><b>Definition:</b> yhttp.cpp:355</div></div>
<div class="ttc" id="aclassyLib_1_1yHttp_html_a3f491c10d7cd73dcde63b64f33878209"><div class="ttname"><a href="classyLib_1_1yHttp.html#a3f491c10d7cd73dcde63b64f33878209">yLib::yHttp::yHttpPostMultiPart</a></div><div class="ttdeci">int8_t yHttpPostMultiPart(const yHttpRequestParam &amp;request_param_, yHttpResponseInfo &amp;response_info_, std::vector&lt; yHttpPostMultiPartItem &gt; &amp;form_multi_part_vec_)</div><div class="ttdef"><b>Definition:</b> yhttp.cpp:508</div></div>
<div class="ttc" id="aclassyLib_1_1yHttp_html_a30f8cce5bf74b4a44c5ee41de7c833cb"><div class="ttname"><a href="classyLib_1_1yHttp.html#a30f8cce5bf74b4a44c5ee41de7c833cb">yLib::yHttp::yHttp</a></div><div class="ttdeci">yHttp() noexcept</div><div class="ttdef"><b>Definition:</b> yhttp.cpp:101</div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html_ae9e10bebbac66f6241a5d5443d3a63ed"><div class="ttname"><a href="structyHttpPostMultiPartItem.html#ae9e10bebbac66f6241a5d5443d3a63ed">yHttpPostMultiPartItem::filename</a></div><div class="ttdeci">std::string filename</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:67</div></div>
<div class="ttc" id="astructyHttpRequestParam_1_1____yhttp__request__query__kv_____html"><div class="ttname"><a href="structyHttpRequestParam_1_1____yhttp__request__query__kv____.html">yHttpRequestParam::__yhttp_request_query_kv__</a></div><div class="ttdef"><b>Definition:</b> yhttp.hpp:37</div></div>
<div class="ttc" id="aclassyLib_1_1yHttp_html_a6f210a2e10f8fa53da542b22de4f3b7f"><div class="ttname"><a href="classyLib_1_1yHttp.html#a6f210a2e10f8fa53da542b22de4f3b7f">yLib::yHttp::~yHttp</a></div><div class="ttdeci">~yHttp() noexcept</div><div class="ttdef"><b>Definition:</b> yhttp.cpp:114</div></div>
<div class="ttc" id="astructyHttpPostUrlencodedItem_html_a4341c09544ae3f6db4b667545b1b6adb"><div class="ttname"><a href="structyHttpPostUrlencodedItem.html#a4341c09544ae3f6db4b667545b1b6adb">yHttpPostUrlencodedItem::key</a></div><div class="ttdeci">std::string key</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:74</div></div>
<div class="ttc" id="aclassyLib_1_1yHttp_html_a6ce13e2972d68be00235c7a613abfa48"><div class="ttname"><a href="classyLib_1_1yHttp.html#a6ce13e2972d68be00235c7a613abfa48">yLib::yHttp::yHttpPostJson</a></div><div class="ttdeci">int8_t yHttpPostJson(const yHttpRequestParam &amp;request_param_, yHttpResponseInfo &amp;response_info_, std::string &amp;json_str_)</div><div class="ttdef"><b>Definition:</b> yhttp.cpp:434</div></div>
<div class="ttc" id="aclassyLib_1_1yHttp_html_a2c2ca50c6ac8d6893478857d03587556"><div class="ttname"><a href="classyLib_1_1yHttp.html#a2c2ca50c6ac8d6893478857d03587556">yLib::yHttp::yHttpGet</a></div><div class="ttdeci">int8_t yHttpGet(const yHttpRequestParam &amp;request_param_, yHttpResponseInfo &amp;response_info_)</div><div class="ttdef"><b>Definition:</b> yhttp.cpp:297</div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html_afca9091d97ef6eb790dfbd6ce8200292"><div class="ttname"><a href="structyHttpPostMultiPartItem.html#afca9091d97ef6eb790dfbd6ce8200292">yHttpPostMultiPartItem::GetPngFileMIMEType</a></div><div class="ttdeci">static std::string GetPngFileMIMEType(void)</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:58</div></div>
<div class="ttc" id="ayobject_8hpp_html"><div class="ttname"><a href="yobject_8hpp.html">yobject.hpp</a></div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html_af3fdf5c3d2281a023f5bb1e1957d184a"><div class="ttname"><a href="structyHttpPostMultiPartItem.html#af3fdf5c3d2281a023f5bb1e1957d184a">yHttpPostMultiPartItem::GetJpgFileMIMEType</a></div><div class="ttdeci">static std::string GetJpgFileMIMEType(void)</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:57</div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html_a64bc038f90da372129e119c3d3ee7707"><div class="ttname"><a href="structyHttpPostMultiPartItem.html#a64bc038f90da372129e119c3d3ee7707">yHttpPostMultiPartItem::content_disposition</a></div><div class="ttdeci">std::string content_disposition</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:63</div></div>
<div class="ttc" id="astructyHttpPostMultiPartItem_html_af396516c031ddfc8f436ecde26b770f5"><div class="ttname"><a href="structyHttpPostMultiPartItem.html#af396516c031ddfc8f436ecde26b770f5">yHttpPostMultiPartItem::name</a></div><div class="ttdeci">std::string name</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:66</div></div>
<div class="ttc" id="anamespaceyLib_html"><div class="ttname"><a href="namespaceyLib.html">yLib</a></div><div class="ttdoc">This is a top namespace in yLib.</div><div class="ttdef"><b>Definition:</b> ylinuxerrnohelper.cpp:28</div></div>
<div class="ttc" id="astructyHttpRequestParam_html_ad7af29f39684f55176406f6863274c99"><div class="ttname"><a href="structyHttpRequestParam.html#ad7af29f39684f55176406f6863274c99">yHttpRequestParam::http_header_vec</a></div><div class="ttdeci">std::vector&lt; std::string &gt; http_header_vec</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:42</div></div>
<div class="ttc" id="astructyHttpPostUrlencodedItem_html_a6284f96f271324fc2bcfa340bfca0713"><div class="ttname"><a href="structyHttpPostUrlencodedItem.html#a6284f96f271324fc2bcfa340bfca0713">yHttpPostUrlencodedItem::value</a></div><div class="ttdeci">std::string value</div><div class="ttdef"><b>Definition:</b> yhttp.hpp:75</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_3a4d35156996fb70540e167b84a39bd1.html">utility</a></li><li class="navelem"><a class="el" href="yhttp_8hpp.html">yhttp.hpp</a></li>
    <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  </ul>
</div>
</body>
</html>
